package com.jy.oms.framework.asyn.task.checker;


import com.jy.oms.framework.asyn.task.checker.model.ExecutorCheckParam;
import com.jy.oms.framework.asyn.task.checker.model.ExecutorCheckResult;

/**
 * 执行器校验
 *
 * @author liuquan
 */
public interface IExecutorChecker {

    int CHECKER_HIGHEST_ORDER = Integer.MIN_VALUE;

    int CHECKER_LOWEST_ORDER = Integer.MAX_VALUE;

    /**
     * 校验器优先级，越小越先执行判断
     */
    default int getExecutorCheckerOrder() {
        return CHECKER_LOWEST_ORDER;
    }

    ExecutorCheckResult canExecute(ExecutorCheckParam executorCheckParam);
}
